
Partial Class Admin_frmModifyShippingCharge
    Inherits System.Web.UI.Page
    Dim VarShippingChargeId As String
    Dim _ShippingChargeVO As New ShippingChargeVo
    Dim _BO As New Bo
    Dim _EmployeeId As String
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        _EmployeeId = Session("EmpId")
        If _EmployeeId = "" Then
            Response.Redirect("../Client/frmLogin.aspx")
        End If
        VarShippingChargeId = Request.QueryString("ShippingChargeId")
        If VarShippingChargeId = "" Then
            Response.Redirect("frmTabShippingCharge.aspx")
        Else
            If Not IsPostBack Then
                GetShippingChargeData()
            End If
        End If
    End Sub
    Sub GetShippingChargeData()
        _ShippingChargeVO = _BO.getShippingChargeById(VarShippingChargeId)
        lblShippingChargeId.Text = _ShippingChargeVO.ShippingChargeId
        txtCharge.Text = _ShippingChargeVO.Charge
    End Sub
    Protected Sub btnSubmit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSubmit.Click
        SetData()
        Session("EmpId") = _EmployeeId
    End Sub
    Sub SetData()
        _ShippingChargeVO.ShippingChargeId = lblShippingChargeId.Text
        _ShippingChargeVO.Charge = txtCharge.Text
        _BO.ModifyShippingCharge(_ShippingChargeVO)
        ClearAll()
    End Sub
    Public Sub ClearAll()
        txtCharge.Text = ""
        MsgBox("ShippingCharge Modified")
        Response.Redirect("frmTabShippingCharge.aspx", False)
    End Sub
  
    Protected Sub btnReset_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnReset.Click
        txtCharge.Text = ""
    End Sub
End Class
